1. Field of the Invention
The present invention relates to a system and to a method for determining the activity of a person lying down.
2. Description of the Related Art
Systems and methods for motion analysis based on hidden Markov models are known, such as those described for example in the documents “Gesture recognition using the XWand” by Daniel Wilson and Andy Wilson and “Motion-based gesture recognition with an accelerometer” (bachelor's thesis) by P. V. Borza.
The document “A hidden Markov model-based stride segmentation technique applied to equine inertial sensor trunk movement data”, Journal of Biomechanics 41 (2008), 216-220 by Thilo Pfau, Marta Ferrari, Kevin Parsons and Alan Wilson relates to analysis of driving by horses.
An object of the invention is to allow the activity of a person lying down to be determined.
According to one aspect of the invention, a system is proposed for determining the activity of a person lying down, comprising at least two processing pathways of signals at the output of at least one motion sensor substantially affixed to said person, wherein a first of said at least two processing pathways processes a first component comprising signals of low frequencies and a second processing pathway processes a second component of signals of high frequencies, in which the system further comprises:                first calculation means for calculating a first variable (x(n)) representing a temporal variation of said first component, for at least an axis of said motion sensor;        second calculation means for calculating a second variable (y(n)) comprising the Euclidean norm, along at least one measurement axis, of said second component; and        analysis means configured for determining an activity of said person as a function of time using a hidden Markov model having N states corresponding to N activities respectively,        said analysis means being configured for combining:        conjoint probability density functions of said first and second variables, said probability density functions being defined for each state of the model in question; and        probabilities of transitions between two successive states.        
According to a preferred embodiment, the probability density functions associated with each state comprise the product of at least one first probability density function of said first variable multiplied by at least one second probability density function associated with said second variable.
It is noted that a hidden Markov model can be defined by two random processes: a first process, which in the present application is called “state” and is not observed, or in other words is hidden, and a second process which is the observation, the probability density function of which at a given instant depends on the value of the state at the same instant. According to this aspect of the invention, the state can take discrete values.
Such a system enables the activity of a person lying down to be determined accurately and at low cost.
In one embodiment, a conjoint probability density function comprises a product of at least one probability density function for obtaining the first variable and of at least one probability density function for obtaining the second variable, said probability density functions being defined by the following expressions:
         {                                                                      P                BF                            ⁡                              (                                  x                  ⁡                                      (                    n                    )                                                  )                                      =                                          1                                                                                                    2                        ⁢                        π                                                              ⁢                                          σ                      x                                                        ⁢                                                                                                    ·                              ⅇ                                  -                                                            x                      2                                                              2                      ⁢                                              σ                        x                        2                                                                                                                                                                                                P                HF                            ⁡                              (                                  y                  ⁡                                      (                    n                    )                                                  )                                      =                                          1                                                                                                    2                        k                                                              ⁢                                          σ                      y                      k                                        ⁢                                          Γ                      ⁡                                              (                                                  k                          2                                                )                                                                              ⁢                                                                                                    ⁢                                                y                  ⁡                                      (                    n                    )                                                                                        k                    2                                    -                  1                                            ⁢                              ⅇ                                  -                                                            y                      ⁡                                              (                        n                        )                                                                                    2                      ⁢                                              σ                        y                        2                                                                                                                                    in which:    PBF(x) is the probability density function of the first variable x corresponding to the state in question;    PHF(y) is the probability density function of the second variable y corresponding to the state in question;    k represents the degree of freedom of the high-frequency component equal to the number of measurement axes taken into account by said motion sensor;    σx represents the square root of the variance of the first variable x, in the state of the hidden Markov model in question;    σy represents the square root of the variance of the second variable y in the state of the hidden Markov model in Question; and    Γ is the gamma function satisfying
                    Γ        ⁡                  (                      1            2                    )                    =              π              ,                  Γ        ⁡                  (          1          )                    =      1        and            Γ      ⁡              (                  n          +          1          +                      1            2                          )              =          n      ⁢                          ⁢                        Γ          ⁡                      (                          n              +                              1                2                                      )                          .            Thus, for each state i, probability density functions Px,i(n) and Py,i(n), can be defined such that:
         {                                                                      P                                  x                  ,                  i                                            ⁡                              (                                  x                  ⁡                                      (                    n                    )                                                  )                                      =                                          1                                                                                                    2                        ⁢                        π                                                              ⁢                                          σ                      x                                                        ⁢                                                                                                    ·                              ⅇ                                  -                                                                                    x                        ⁡                                                  (                          n                          )                                                                    2                                                              2                      ⁢                                              σ                                                  x                          ,                          i                                                2                                                                                                                                                                                                P                                  y                  ,                  i                                            ⁡                              (                                  y                  ⁡                                      (                    n                    )                                                  )                                      =                                          1                                                                                                    2                        k                                                              ⁢                                          σ                                              y                        ,                        i                                            k                                        ⁢                                          Γ                      ⁡                                              (                                                  k                          2                                                )                                                                              ⁢                                                                                                    ⁢                                                y                  ⁡                                      (                    n                    )                                                                                        k                    2                                    -                  1                                            ⁢                              ⅇ                                  -                                                            y                      ⁡                                              (                        n                        )                                                                                    2                      ⁢                                              σ                                                  y                          ,                          i                                                2                                                                                                                                    
σy,i being a quantity proportional to the time average of the variable y(n) in the state i. For example, σy,i is the time average of the variable y(n) divided by k.
Thus, the real probability density functions of the observed signals can be approximated by probability density functions generally tailored to most movements.
In one embodiment, said analysis means are suitable for determining an activity of the lying-down user as a function of time using a hidden Markov model in at most five states chosen from a rest activity, a slight agitation activity, a trembling activity, a moderate agitation activity and a strong agitation activity.
Such a system serves to analyze the activity of a mobile element with improved accuracy. This is because by taking into account the high-frequency component it is possible to use additional information that enables small movements of the sensor, or in other words oscillations or vibrations, such as trembling, to be detected.
According to one embodiment, said analysis means are suitable for determining an activity of the lying-down user from a set of predetermined pairs of values of first and second variances, defining movement classes.
Thus, the non-observed process or state of the hidden Markov model can be a discrete 1st-order Markov process taking values in the set {0, 1, 2, 3, 4}. It can be characterized by the probabilities of transitions from one state to another: P(State=j|State=i).
The observed process of the hidden Markov model is the multidimensional signal (x(n),y(n)), the conjoint probability density function of which depends on the state (the hidden process) at a given instant. Thus, for each state, the conjoint probability density function of the observed signal can be defined by the following equation:
      P    ⁡          (                        x          ⁡                      (            n            )                          ,                                            y              ⁡                              (                n                )                                      ⁢                                                        State                =                i                            )                                =                                    P              iState                        ⁡                          (                              x                ⁡                                  (                  n                  )                                            )                                      ,                                  ⁢                  y          ⁡                      (            n            )                              )        =            ∑              n        =        0                    n        max              ⁢                  ∑                  m          =          0                          m          max                    ⁢                        α                      iState            ,                          m              +                                                (                                                            m                      max                                        +                    1                                    )                                ⁢                n                                                    ⁢                              P                          x              ⁡                              (                                                      σ                    x                                    ⁡                                      [                    m                    ]                                                  )                                              ⁡                      (                          x              ⁡                              (                n                )                                      )                          ⁢                              P                          y              ⁡                              (                                                      σ                    y                                    ⁡                                      [                    n                    ]                                                  )                                              ⁡                      (                          y              ⁡                              (                n                )                                      )                              in which αiState,j is a weighting coefficient enabling a state to be modeled by a plurality of elementary movements. This determination coefficient can be determined experimentally.PiState(x,y), also denoted by Pi(x(n),y(n)) represents the probability density function associated with the state i at the instant n, of x(n) and y(n). It comprises the product of the probability density functions Px,i(x(n)) and Py,i(y(n)) defined above.If a set of observed data θ(n) is considered, combining the observed data x(n) and y(n), the following expression may be written:Pi(x(n),y(n))=Pi(θ(n)=p(θ(n)/E(n)=i),with E(n) representing the state at the instant n.Since P(x,y|State=i) is a probability density function, the following condition is preferably met by the weighting coefficients:
            ∑              n        =        0                    n        max              ⁢                  ∑                  m          =          0                          m          max                    ⁢              α                  iState          ,                      m            +                                          (                                                      m                    max                                    +                  1                                )                            ⁢              n                                            =  1.
Using such classes it is possible to define, for each pair of movement classes, an elementary movement. One state of the model can therefore be described by a number of elementary movements.
In one embodiment, said pairs of values of first and second variances are suitable for satisfying the following conditions:
         {                                        n            ∈                          [                              0                ;                                  n                  max                                            ]                                                                        m            ∈                          [                                                (                                      0                    ;                    m                                    )                                max                            ]                                                                                      n              max                        ≤            10                                                                          m              max                        ≤            10                                                                                          n                max                            ×                              m                max                                      ≥            6.                              
Thus, the number of defined elementary movements makes it possible to describe most movements of a person lying down and remains small enough to allow processing in real time.
In one embodiment, said movement classes are eighteen in number and are defined by:
σx[0]=5×10−3, σx[1]=1.8×10−2, σx[2]=3.5×10−2, σx[3]=5.5×10−2, σx[4]=8×10−2, σx[5]=1×10−1, σy[0]=1×10−2, σy[1]=3×10−2 and σy[2]=8×10−2.
These values are particularly well suited for determining the activity of a person lying down.
According to one embodiment, said real coefficients are defined by the following table:
iState2State4State5State1State(slight3State(moderate(strongClass(rest)agitation)(trembling)agitation)agitation)00.2564000010.05130.052600020.0256400.040030.25640.15790.040040.05130.26320.1600500.05260.200060.25640.15790.040070.05130.26320.160.09260800.05260.200.0926090.0256000.03700100000.1852011000.160.18520120.0256000.0370.0556130000.18520.0556140000.18520.05561500000.27781600000.27781700000.2778
These values are particularly well suited for determining the activity of a person lying down.
At each instant n, it is then possible to determine a state of the person, knowing Pi(x(n),y(n)) by the expression:E(n)=argimax(Px,i(x(n))Py,i(y(n))=argimax(Pi(x(n),y(n)),in which the function arg max represents the maximum argument.If the person at the instant n is at the state i, then E(n)=i.
However, it is generally not satisfactory to determine the state E(n) at the instant n solely from the observed data, x(n) and y(n), and from the associated probability density functions Px,i(x(n)) and Py,i(y(n)) associated with these data respectively.
Experience has shown that it is desirable to take into account a priori, a state, for example the state E(n−1) determined during the instant n−1.
Let us consider the quantity θ(n), collecting the observed data x(n) and y(n), then it is possible to write the following:Pi(x(n),y(n))=Pi(θ(n)=p(θ(n)/E(n)=i),E(n) representing the state at the instant n.If E(0:N) denotes the series of states between the instant n=0 and the instant n=N, and if θ(0:N) denotes the observed data between the instant n=0 and the instant n=N, the probabilities of the sequence of states E(0:N) corresponding to the sequence of states E(0), E(1) . . . E(N) can be expressed as:
      p    ⁡          (                        E          ⁡                      (                          0              ⁢                              :                            ⁢                                                          ⁢              N                        )                          ❘                  θ          ⁡                      (                                          0                ⁢                                  :                                ⁢                                                                  ⁢                N                            -              1                        )                              )        ⁢  α  ⁢          ⁢      p    ⁡          (              E        ⁡                  (          0          )                    )        ⁢      p    ⁡          (                        θ          ⁡                      (            0            )                          /                  E          ⁡                      (            0            )                              )        ⁢            ∏              n        =        1            N        ⁢                  p        ⁡                  (                                    E              ⁡                              (                n                )                                      /                          E              ⁡                              (                                  n                  -                  1                                )                                              )                    ⁢              p        ⁡                  (                                    θ              ⁡                              (                n                )                                      /                          E              ⁡                              (                n                )                                              )                    For example, for the sequence E(0:N)={i, i, i, . . . , i}, this probability can be expressed as:
                                                                        p                ⁡                                  (                                                            E                      ⁡                                              (                        0                        )                                                              =                    i                                    )                                            ⁢                              p                ⁡                                  (                                                                                    θ                        ⁡                                                  (                          0                          )                                                                    ❘                                              E                        ⁡                                                  (                          0                          )                                                                                      =                    i                                    )                                            ⁢                                                ∏                                      n                    =                    1                                    N                                ⁢                                  p                  ⁡                                      (                                                                  E                        ⁡                                                  (                          n                          )                                                                    =                                                                        i                          ❘                                                      E                            ⁡                                                          (                                                              n                                -                                1                                                            )                                                                                                      =                        i                                                              )                                                                        )                    ⁢                      p            ⁡                          (                                                                    θ                    ⁡                                          (                      n                      )                                                        ❘                                      E                    ⁡                                          (                      n                      )                                                                      =                i                            )                                      )                            (        1        )            
The estimated sequence of states E(0:N) can be that in which the probability is the highest. In practice, rather than considering all the possible sequences and for each one calculating its probability, it may be advantageous to use a Viterbi algorithm for estimating this sequence.
P(E(0)) denotes the probability associated with the initial state E(0). It is possible for example to choose an equiprobable distribution of each of the possible states when n=0.
p(θ(0)/E(0)) represents the probability of observing the data θ(0) at the instant E(0). This corresponds to the probability Pi(x(n=0),y(n=0)) with E(n)=i.
p(E(n)/E(n−1)) represents the probability of being in a state E(n) at the instant n, whereas the person was in a state E(n−1) at the instant n−1.
p(θ(n)/E(n)) represents the probability of observing the quantities θ(n) when the person is in the state E(n). This corresponds to the probability Pi(x(n),y(n)) with E(n)=i.
The probabilities p(E(n)/E(n−1)) correspond to probabilities of a transition from a state E(n−1) to a state E(n). These probabilities are indicated in the following embodiment table, adopting the notations E(n−1)=j and E(n)=i.
The series of states E(0) . . . E(N) maximizing the expression (1) may be obtained using for example the Viterbi algorithm well known to those skilled in the art.
Thus:    1) by establishing, for each state E(n):            the probability of observing the quantities θ(n) when the person is in the state E(n), denoted by p(θ(n)/E(n));        the probability of a transition from a state E(n−1) to a state E(n), denoted by p(E(n)/E(n−1));            2) by establishing the probability associated with each state E(0); and    3) by obtaining observed quantities θ(n) at each instant n between n=0 and n=N,it is possible to obtain the most probable series of states E(0) . . . . E(N).
It is noted that, in the expression θ(n)={x(n), y(n)}, x(n) and y(n) are the so-called low-frequency and high-frequency components respectively of the signal S(n) measured by the motion sensor at the instant n.
In one embodiment, the probabilities P, of said hidden Markov model, for transitions between two successive states representing respectively one type of posture, are such that:
2State4State5StateP(jState/1State(slight3State(moderate(strongiState)(rest)agitation)(trembling)agitation)agitation)1State0.99000.00250.00250.00250.0025(rest)2State0.0070.990.00100.00100.0010(slightagitation)3State0.0070.00100.990.00100.0010(trembling)4State0.0070.00100.00100.990.0010(moderateagitation)5State0.0070.00100.00100.00100.99(strongagitation)
These values are particularly well suited for determining the activity of a person lying down.
According to one embodiment, the system includes display means.
Thus, the results may be displayed in real time or subsequently.
In one embodiment, said motion sensor comprises an accelerometer and/or a magnetometer and/or a gyroscope.
According to one embodiment, the system comprises fastening means suitable for being fastened to the wrist, to the torso or to the head of the person.
According to another aspect of the invention, a method is provided for determining the activity of a person lying down, comprising at least a step of configuring two processing pathways of signals at the output of at least one motion sensor substantially affixed to said person, wherein a first of said at least two processing pathways processes a first component comprising signals of low frequencies and a second processing pathway processes a second component of signals of high frequencies, said method further comprising:                a first calculation step for calculating a first variable (x(n)) representing a temporal variation of said first component, for at least an axis of said motion sensor;        a second calculation step for calculating a second variable (y(n)) comprising the Euclidean norm, along at least one measurement axis, of said second component; and        an analysis step for determining an activity of said person as a function of time using a hidden Markov model having N states corresponding to N activities respectively,        said analysis step combining sub-steps of calculating:        conjoint probability density functions of said first and second variables, said probability density functions being defined for each state of the model in question; and        probabilities of transitions between two successive states.        